<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<title>Portal 无线认证</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=7">
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="viewport" content="width=device-width; initial-scale=1.0; minimum-scale=1.0; maximum-scale=2.0">
<meta name="MobileOptimized" content="240">
<link rel="icon" type="image/png" th:href="@{/portal/icons/favicon.ico}"/>
<link rel="stylesheet" type="text/css" th:href="@{/portal/vendor/bootstrap/css/bootstrap.min.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/portal/fonts/font-awesome-4.7.0/css/font-awesome.min.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/portal/fonts/Linearicons-Free-v1.0.0/icon-font.min.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/portal/vendor/animate/animate.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/portal/vendor/css-hamburgers/hamburgers.min.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/portal/vendor/animsition/css/animsition.min.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/portal/vendor/select2/select2.min.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/portal/vendor/daterangepicker/daterangepicker.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/portal/css/util.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/portal/css/main.css}"/>
<script>

var doLogin = function(authmode){
	$("#authmode").val(authmode);
	$("#wlanForm").attr("method", "get");
	$("#wlanForm").submit();
}

var doWxLogin = function(authmode){
	$("#authmode").val(authmode);
	$("#wlanForm").attr("method", "post");
	$("#wlanForm").submit();
}
// TODO 直接跳转到用户密码认证 有需要再自己扩展其它认证方式
/*window.onload = function () {
	doLogin('userauth');
}*/
</script>
</head>
<body>
	
	<div class="limiter">
		<div class="container-login100">
			<div class="wrap-login100 p-t-90 p-b-30">
				<form id="wlanForm" class="login100-form validate-form" action="/portal/wlan/login" method="get">
					<span class="login100-form-title p-b-40">
						PORTAL 无线认证
					</span>

					<div>
						<a th:if="${wlanUserauthEnabled} == 'enabled'" href="javascript:doLogin('userauth');" class="btn-login-with bg1 m-b-10" >
							<i class="fa fa-user"></i>
							帐号认证
						</a>
						<a th:if="${wlanPwdauthEnabled} == 'enabled'" href="javascript:doLogin('pwdauth');" class="btn-login-with bg1 m-b-10">
							<i class="fa fa-key"></i>
							密码认证
						</a>
						<a th:if="${wlanWxauthEnabled} == 'enabled'" href="javascript:doWxLogin('wxauth');" class="btn-login-with bg3 m-b-10">
							<i class="fa fa-wechat"></i>
							微信认证
						</a>
						<a th:if="${wlanSmsauthEnabled} == 'enabled'" href="javascript:doLogin('smsauth');" class="btn-login-with bg2">
							<i class="fa fa-comments-o"></i>
							短信认证
						</a>
						<input type="hidden" id="template" name="template" value="default">
						<input type="hidden" id="wlanuserip" name="wlanuserip" th:value="${param.wlanuserip}"/>
						<input type="hidden" id="wlanusername" name="wlanusername" th:value="${param.wlanusername}"/>
						<input type="hidden" id="wlanusermac" name="wlanusermac" th:value="${param.wlanusermac}"/>
						<input type="hidden" id="wlanstamac" name="wlanstamac" th:value="${param.wlanstamac}"/>
						<input type="hidden" id="wlanacname" name="wlanacname" th:value="${param.wlanacname}"/>
						<input type="hidden" id="wlanacip" name="wlanacip" th:value="${param.wlanacip}"/>
						<input type="hidden" id="wlanapmac" name="wlanapmac" th:value="${param.wlanapmac}"/>
						<input type="hidden" id="ssid" name="ssid" th:value="${param.ssid}"/>
						<input type="hidden" id="wlanuserfirsturl" name="wlanuserfirsturl" th:value="${param.wlanuserfirsturl}"/>
						<input type="hidden" id="vendor" name="vendor" th:value="${param.vendor}"/>
						<input type="hidden" id="error" name="error" th:value="${param.error}"/>
						<input type="hidden" id="username" name="username" th:value="${param.username}"/>
						<input type="hidden" id="domain" name="domain" th:value="${param.domain}"/>
						<input type="hidden" id="url" name="url" th:value="${param.url}"/>
						<input type="hidden" id="srcacip" name="srcacip" th:value="${param.srcacip}"/>
						<input type="hidden" id="authmode" name="authmode" th:value="${param.authmode}"/>
					</div>

					<div th:if="${joinUrl} != null and ${joinUrl} != ''" class="flex-col-c p-t-100">
						<a th:href="${joinUrl}" class="txt3 bo1 hov1" target="_blank">
							立即注册
						</a>
					</div>

				</form>
			</div>
		</div>
	</div>

<script th:src="@{/portal/vendor/jquery/jquery-3.2.1.min.js}"></script>
<script th:src="@{/portal/vendor/animsition/js/animsition.min.js}"></script>
<script th:src="@{/portal/vendor/bootstrap/js/popper.js}"></script>
<script th:src="@{/portal/vendor/bootstrap/js/bootstrap.min.js}"></script>
<script th:src="@{/portal/vendor/select2/select2.min.js}"></script>
<script th:src="@{/portal/vendor/daterangepicker/moment.min.js}"></script>
<script th:src="@{/portal/vendor/daterangepicker/daterangepicker.js}"></script>
<script th:src="@{/portal/vendor/countdowntime/countdowntime.js}"></script>
<script th:src="@{/portal/js/main.js}"></script>
</body>
</html>